<template>
  <el-container>
    <el-aside width="200px">
      <slot name="side"></slot>
    </el-aside>
    <el-container>
      <el-header height="50px">
        <slot name="header"></slot>
      </el-header>
      <el-main>
        <slot name="topside"></slot>
        <slot name="tableCon"></slot>
      </el-main>
    </el-container>
  </el-container>
</template>

<script type="text/ecmascript-6">
import bus from "../../bus/bus";
export default {
  name: "",
  data() {
    return {
      collapse: false,
      flag: false,
      activeIndex: '0',
    };
  },
  created() {
  },
  methods: {
    click(e) {
      let side = document.querySelector(".side");
      let content = document.querySelector(".content");
      side.classList.toggle("sideClick");
      content.classList.toggle("contentClick");
    },
    router(router, id) {
      console.log("menuId" + id);
      this.$store.commit("setMenuId", id);
      this.$router.push({ path: "/" + router });
    },
    handleOpen(key, keyPath) {
    },
    handleClose(key, keyPath) {
    },
  },
  mounted() {
    bus.$on("collapse", msg => {
      this.collapse = msg;
    });
  },
  components: {}
};
</script>

<style lang="scss">
.el-container {
  height: 100%;

  .el-aside {}

  .el-header {
    /*border-bottom: 1px solid #f1f2f3;*/
    background-color: #e7ebee;
    height: 50px;
  }

  .el-main {
    padding: 0 10px;
    background-color: #e7ebee;
  }
}
</style>
